<%@ page language="java" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="ww" uri="webwork"%>
<tr>
    <td class="tdLable" colspan="2">家庭成员及社会关系</td>
    <td colspan="10">
        <table style="width: 96%;border: 1px solid #D2D6DE;border-collapse: collapse;">
            <thead>
            <tr>
                <th width="15%">称谓</th>
                <th width="15%">姓名</th>
                <th width="195px;">出生年月</th>
                <th width="15%">政治面貌</th>
                <th >工作单位及职务</th>
                <th width="50px">操作</th>
            </tr>
            </thead>
            <tbody id="family_new">
            <ww:iterator value="userInfoPageVo.userFamilyVoList" id="data" status="data">
                <tr>
                    <td class="text-center"><input name = "appellation" type="text" class="form-control"  value="<ww:property value='appellation'/>"></td>
                    <td class="text-center"><input name = "membername" type="text" class="form-control"  value="<ww:property value='membername'/>"></td>
                    <td class="text-center">
                        <input type="text" name="birthday" class="Wdate form-control"  readonly="readonly"
                               onclick="WdatePicker({dateFmt:'yyyy-MM',maxDate:'%y-%M'})" onchange="createFamilyJson();" value='<ww:property value="birthday"/>'>
                    </td>
                    <td class="text-center"><input name = "politicallandscape" type="text" class="form-control"  value="<ww:property value='politicallandscape'/>"></td>
                    <td class="text-center"><input name = "unitandposition" type="text" class="form-control"  value="<ww:property value='unitandposition'/>"></td>
                    <td class="text-center">
                        <a onclick="delMember(this)" style="display:inline-block;" href="javascript:;">删除</a>
                    </td>
                </tr>
            </ww:iterator>
            <ww:if test="userInfoPageVo.userFamilyVoList==null">
                <tr style="line-height: 35px;height: 35px;">
                    <td class="text-center"><input type="text" name="appellation" class="form-control"></td>
                    <td class="text-center"><input type="text" name="membername" class="form-control"></td>
                    <td class="text-center">
                        <input name="birthday" type="text" class="Wdate form-control"  readonly="readonly"
                               onclick="WdatePicker({dateFmt:'yyyy-MM',maxDate:'%y-%M'})" onchange="createFamilyJson();">
                    </td>
                    <td class="text-center"><input type="text" name="politicallandscape" class="form-control"></td>
                    <td class="text-center"><input type="text" name="unitandposition" class="form-control"></td>
                    <td class="text-center">
                        <a onclick="delMember(this)" style="display:inline-block;" href="javascript:;">删除</a>
                    </td>
                </tr>
            </ww:if>
            </tbody>
        </table>
        <div class="addOne" title="点击新增一行" onclick="addMember();"><i class="fa fa-user-plus" aria-hidden="true"></i>&nbsp;新增成员</div>
    </td>
</tr>

<script>
    //监听family块输入变动
    $("#family_new",$navTab.focus()).find("input").bind('change',function(e){
        createFamilyJson();
    });
</script>